﻿using System;
using System.Collections.Generic;
using System.Text;


/// <summary>
/// 双向链表结点
/// </summary>
public class DbNode<T>
{
    private T data;//数据域
    private DbNode<T> prev;//前驱引用域
    private DbNode<T> next;//后继引用域

    public DbNode(T val, DbNode<T> p)
    {
        data = val;
        next = p;
    }

    public DbNode(DbNode<T> p)
    {
        next = p;
    }

    public DbNode(T val)
    {
        data = val;
        next = null;
    }

    public DbNode()
    {
        data = default(T);
        next = null;
    }

    public T Data { get { return data; } set { data = value; } }
    public DbNode<T> Next { get { return next; } set { next = value; } }
    public DbNode<T> Prev { get { return prev; } set { prev = value; } }
}

